#version 130

in vec4 Vertex;
in vec2 TexCoord0;

out vec2 TexCoord;
out vec3 Normal;
out vec3 LightDirection;
out vec3 EyeDirection;
out vec3 VertPos;

uniform mat4 ModelView;
uniform mat4 Projection;
uniform vec3 LightPosition;
uniform vec3 EyePosition;

void main(void)
{
  TexCoord = gl_MultiTexCoord0.st;
  Normal = gl_Normal;

  vec4 MVPosition = ModelView * Vertex;
  gl_Position = Projection * MVPosition;
  
  LightDirection = LightPosition - MVPosition.xyz;
  EyeDirection = EyePosition - MVPosition.xyz;
  VertPos = Vertex.xyz;
}       